package com.mldong.modules.sys.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.*;
import com.mldong.validation.Groups;
/**
 * <p>
 * 已完成任务的历史归档
 * </p>
 *
 * @author mldong
 * @since 2025-10-12
 */
@Getter
@Setter
@TableName("sys_task_execution_history")
@ApiModel(value = "TaskExecutionHistoryParam对象", description = "已完成任务的历史归档")
public class TaskExecutionHistoryParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键", required = true)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotNull(message = "主键不能为空", groups = {Groups.Update.class})
    private Long id;

    @ApiModelProperty(value = "任务名称", required = true)
    @NotBlank(message = "任务名称不能为空")
    private String taskName;

    @ApiModelProperty(value = "springbean名称", required = true)
    @NotBlank(message = "springbean名称不能为空")
    private String springBeanName;

    @ApiModelProperty(value = "业务ID", required = true)
    @NotNull(message = "业务ID不能为空")
    private Long bizId;

    @ApiModelProperty(value = "任务状态(2=成功, 9=失败-终态)")
    private Integer taskState;

    @ApiModelProperty(value = "最新执行时间")
    private Date finishedTime;

    @ApiModelProperty(value = "允许最大失败次数")
    private Integer allowMaxErrorCount;

    @ApiModelProperty(value = "运行失败次数")
    private Integer errorCount;

    @ApiModelProperty(value = "最近运行错误原因")
    private String errorReason;

    @ApiModelProperty(value = "扩展属性JSON")
    private String variable;


}
